package com.molihub.service.impl;

import com.molihub.entity.ArticleKind;
import com.molihub.service.ArticleKindService;
import com.molihub.utils.LogUtils;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: ArticleKindServiceImpl
 * @Description: 文章类别业务层接口实现类
 * @author: xw
 * @date 2020/1/26 21:18
 * @Version: 1.0
 **/
@Service
public class ArticleKindServiceImpl extends BaseService implements ArticleKindService {

    Logger logger = LogUtils.getInstance(UserServiceImpl.class);

    @Override
    public Integer addArticleKind(ArticleKind articleKind) {
        return articleKindMapper.addArticleKind(articleKind);
    }

    @Override
    public Integer deleteArticleKind(ArticleKind articleKind) {
        return articleKindMapper.deleteArticleKind(articleKind);
    }

    @Override
    public List<ArticleKind> getArticleKindsByUserId(Integer userId) {
        return articleKindMapper.getArticleKindsByUserId(userId);
    }

    @Override
    public ArticleKind getArticleKindById(Integer id) {
        return articleKindMapper.getArticleKindById(id);
    }

    @Override
    public Integer updateArticleKind(ArticleKind articleKind) {
        return articleKindMapper.updateArticleKind(articleKind);
    }

    @Override
    public Integer getKindCountByUserId(Integer userId) {
        return articleKindMapper.getKindCountByUserId(userId);
    }
}
